package demo.using.threadPool;

/**
 * @author : GuoFei
 * @since : 2019/7/4 15:30
 */
public class ThreadBO extends Thread {
    private int a = 1;
    private int b = 1;

    @Override
    public void run() {
        synchronized (this) {
            a++;
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            b++;
        }
    }

    void showValue(){
        System.out.println("a = " + a+"b = " + b);
    }
}
